﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EstateInfo.aspx.cs" Inherits="ZLDC.Estate.PM.EstateInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>添加提醒</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script src="../js/LexunJS.js" type="text/javascript"></script>

    <link href="../css/PLG.css" rel="stylesheet" type="text/css" />

    <script src="../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    
    <script src="../js/jquery.autocomplete.js" type="text/javascript"></script>

    <base target="_self" />

    <script type="text/javascript">
        $(document).ready(function() {
            var hid = LexunJS.GetQueryString("id");

            document.getElementById("housingId").value = hid;
        });

        function submitOk() {
            //提交信息
            var datatime = document.getElementById("AlertDate").value;
            var AlertContent = document.getElementById("AlertContent").value;

            if (datatime == "") {
                alert("请输入提醒时间");
                return;
            }
            if (AlertContent == "") {
                alert("请输入提醒内容！");
                return;
            }
            if (document.getElementById("AlertScope").value == "指点人员") {
                if (document.getElementById("AlertUser").value == "") {
                    alert("请输入指定人员！");
                    document.getElementById("AlertUser").focus();
                    return;
                }
            }
            document.forms[0].submit();
        }
        //提醒范围
        function SelectItem() {
            var SelectValue = document.getElementById("AlertScope").value;
            if (SelectValue == "指定人员") {
                document.getElementById("AlertUser").style.display = "";
             }else {
                document.getElementById("AlertUser").style.display = "none";
             }
         }
    </script>

</head>
<body>
    <form id="form1" runat="server" action="../Handler/HandlerHousing.ashx?act=p_housingAlert_save"
    enctype="multipart/form-data" method="post">
         <table  style="width:100%;"  border="0" align="center" bgcolor="#CCCCCC" cellpadding="0" cellspacing="0">
                <tr>
                    <td bgcolor="#F7F7F7" align="right" style="height: 25px;">
                        提醒类型：
                    </td>
                    <td bgcolor="#F7F7F7" style="width: 30%; height: 25px;" colspan="3">
                        <select id="AlertType" runat="server" name="AlertType" style="width: 28%">
                        </select>
                    </td>
                </tr>
                <tr>
                    <td bgcolor="#F7F7F7" align="right" style="height: 25px;">
                        提醒日期：
                    </td>
                    <td bgcolor="#F7F7F7" style="width: 30%; height: 25px;">
                        <input id="AlertDate" name="AlertDate" type="text" onfocus="WdatePicker({minDate:'%y-%M-#{%d}'})" />
                    </td>
                    <td bgcolor="#F7F7F7" style="width: 20%; height: 25px;" align="right">
                        提醒范围：
                    </td>
                    <td bgcolor="#F7F7F7" style="width: 37%; height: 25px;">
                        <select id="AlertScope" name="AlertScope" onchange="SelectItem();" runat="server" style="width:40%">
                        </select>
                        
                        <input id="AlertUser"   name="AlertUser" style="width:98%;display:none" type="text"/>
                    </td>
                </tr>
                <tr>
                    <td bgcolor="#F7F7F7" align="right" style="height: 35px;">
                        提醒内容：
                    </td>
                    <td colspan="3" bgcolor="#F7F7F7" style="width: 70%; height: 35px;">
                        <textarea id="AlertContent" name="AlertContent" cols="20" rows="2"></textarea>
                    </td>
                </tr>
                <tr>
                    <td colspan="4"  style="height: 35px;" bgcolor="#F7F7F7"  align="center">
                        <input id="btnSave" type="button" value="确定"  class="button_bak" onclick="return submitOk()" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <input id="btnCancle" type="button" value="关闭"  class="button_bak" onclick="window.close();" />
                    </td>
                </tr>
            </table>
     
        
        <script language="javascript" type="text/javascript">
            $(document).ready(function() {
            $("#AlertUser").autocomplete("../Ajax/GetUserAuto.aspx", { minChars: 2, extraParams: { uname: function() { return escape($('#AlertUser').val()); } }, scrollHeight: 350, width: 180, max: 100 });
            });

        </script>
        
        
        <input id="housingId" name="housingId" type="hidden" />

    </form>
</body>
</html>
